<!DOCTYPE html>
<html lang="en">
<head>
    <script src="../js/vue.js"></script>
    <title>Document</title>
</head>
<body>
   <div id="root">
       <a :href="url" v-text='title'></a>
       <div v-html='htmlStr'></div>
   </div> 
   <script>
       new Vue({
            el:'#root',
            data(){
                //return之后才会有数据
                console.log(this);//在执行这行代码时vue中没有下列数据
                
                return {
                    url:'http://www.baidu.com',
                    title:'百度',
                    htmlStr:'<h2>v-html ${this.title}</h2>'
                }
            },
        })
   </script>
</body>
</html>